package com.leoman.customer.dao;

import com.leoman.common.dao.IBaseJpaRepository;
import com.leoman.customer.entity.CustomerDemand;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * Created by Daisy on 2016/12/27.
 */
public interface CustomerDemandDao extends IBaseJpaRepository<CustomerDemand> {

    @Query("select a from CustomerDemand a where a.customerId = ?1")
    public List<CustomerDemand> findByCustomerId(Long customerId);

    @Query("select a from CustomerDemand a where a.customerId = ?1")
    public List<CustomerDemand> findByCustomerIdOrderDesc(Long customerId);

}
